this._responseEntry.clutter_text.connect('text-changed', Lang.bind(this, this._onEntryChanged));
this.setActionArea(this._responseEntry);
+ this._responseEntry.clutter_text.connect('key-focus-in', Lang.bind(this, function() {
+ this.focused = true;
+ }));
+ this._responseEntry.clutter_text.connect('key-focus-out', Lang.bind(this, function() {
+ this.focused = false;
+ this.emit('unfocused');
+ }));
+
this._oldMaxScrollAdjustment = 0;
this._createScrollArea();
this._lastGroup = null;
// 'transient' is a reserved keyword in JS, so we have to use an alternate variable name
this.isTransient = false;
this.expanded = false;
+ this.focused = false;
this.showWhenLocked = false;
this.acknowledged = false;
this._destroyed = false;
let notificationExpanded = this._notification && this._notification.expanded;
let notificationExpired = this._notificationTimeoutId == 0 &&
!(this._notification && this._notification.urgency == Urgency.CRITICAL) &&
+ !(this._notification && this._notification.focused) &&
!this._pointerInTray &&
!this._locked &&
!(this._pointerInKeyboard && notificationExpanded);
Lang.bind(this, this._onIdleMonitorWatch));
this._notificationClickedId = this._notification.connect('done-displaying',
Lang.bind(this, this._escapeTray));
+ this._notification.connect('unfocused', Lang.bind(this, function() {
+ this._updateState();
+ }));
this._notificationBin.child = this._notification.actor;
this._notificationWidget.opacity = 0;